package com.thread;

import java.util.concurrent.FutureTask;

public class Test{
    public static void main(String[] args) throws Exception{
        FinalThread finalThread = new FinalThread();
        Person person1 = new Person(finalThread);
        Person person2 = new Person(finalThread);
        Thread thread1 = new Thread(person1, "小红");
        Thread thread2 = new Thread(person2, "小明");
        thread1.start();
        thread2.start();
        thread1.join();
        thread2.join();
        System.out.println(thread1.getName() + "送出" + person1.getTimes());
        System.out.println(thread2.getName() + "送出" + person2.getTimes());
    }
}